package com.icinfo.cloud.provider.punish.common.seal.utils;

import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import feign.Param;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;

/**
 * 查询的对象入参对象
 *
 * @author yunchao.peng
 * @create 2023-08-09 22:33
 */
@Data
@AllArgsConstructor
public class SearchInfoKeyValue {

    /**
     * ENTNAME,UNISCID,SFZHM
     */
    public String key;

    /**
     * eq,like
     */
    public String operator;

    /**
     * 510212198212081328, 张%
     */
    public String value;

    public JSONObject cover(){
        if(ObjectUtil.hasEmpty(key,operator,value)){
            throw new IllegalArgumentException();
        }
        JSONObject jsonObject = new JSONObject();
        jsonObject.put(key + "." + operator, value);
        return jsonObject;
    }




}
